template vars default values weren't used if db entry for the var is 'undefined' -> fixed