fix hasClass defect