fixed bug that prevented requiring this as a node module