fix for return statements

Fixes issue #5