fixed some bugs with work mgmt