bugfix: ensure updating the wrk pointer while iterating