Fix crash on ipod app quit