fixed problem with url redirects after deletion or duplication