Used a local var for origType.
Merge pull request #14 from fidlej/topic_local_origType

Used a local var for origType