fix issue with namespaces not receiving the proper environment