fix closure and do syntax

few fixes for latest rust