fix issue where nil was returned instead of an empty map