fixed returning stmts bug