Fixes #999 - template:list throws UnexpectedValueException
Merge pull request #1001 from siad007/patch-1

Fixes #999 - template:list throws UnexpectedValueException