Fixed a bug on Controller_Scaffold::detach()