fixed map breaking on changing tabs