fixed bug with wrong attribute locations