fixed error with not initialized map