revert 7734395d0911a94164d165ef0b940d2a5e4a0965 did not work with enum
types. Will have to update the actual templates.