fixed bug with attributes