fixed the rerouting after delete