fixes multiple issues parsing attributes