Fix bug which compare class to string.