fix crashes when changing tanks