Fixed the delete query.