prevent crash on mapchange