Fixed hasClass check, dots should not be there