added handling of map element resize, removed debug messages