fixed a bug causing deletes to fail