Fixed bugs in manager