Used a local var for origType

Next time, you can find the bug yourself, by using `require 'util/warn'`