prevent crash when flicking image on iOS 6