fixed delete query to avoid "synchronize_session"