fixing some bugs that may have been added by namespaces