map() issues with a temporary solution