fixing PHP error on delete