fixed the delete method

Delete method now redirects properly to the index page after an item is
deleted