fix up the destroy method to properly clean up the URL state