Made a few small changes so that the delete wouldnt redirect to a broken page