fixing a bug in getwork