fix toggleclass and hasclass