fixed bad code for parsing char class