fixing illegal return statement in nw-checked