fix bugs in the manage controller