fixed issue with var for title case

fixed issue with title case producing an undefined