Fixes map toggle bug

The function call was nested inside checkWidth listener, which made it
act all crazy...