Bug fix in capemanager