Fix for issues installing via pip or install.py

Passes unit tests and installs without issue using pip.