fix linux build
fix crash after opening new image