fixed data types and references based upon comments in the pull request