bugfixage for toplevel def parsing
test for toplevel parsing