fixed a bug

fixed a bug with attributes allocation