fixed crashing on smaller maps