Some changes for better work with map