fix six issue with module imports

See #3518