fixed sql delete problem