try to avoid app crash after cropping the image