fix bugs in manager etc