work generator - fixed bugs