trying to fix map refresh bug