fix compiling toplevel calls