fixing empty map issue