Fix crash on exit event in the shop menu