fixes to modules, recursion not working