fixes to getnextwork