fixed occasional map gen crash