fix crash after take pic