Fix some issues with maps