Fix class issue and regular expression issue