Found bug in token class which wasn't parsing token string correctly