Fix sql delete