fix error with do..end block