fix undefined reference errors
Merge pull request #124 from dwrensha/ReferenceError

fix undefined reference errors