Updating delete query