Fixed delete query