fixed bug on router not destroying previous controller