fix map shift crash on small maps