Fixing problems with redirection after deleting an attachment.