Fixed crash after saving a new market