parse id correctly if class names is missing