fixed a bug in controller's destroy action