fixed critical bug@attribute cache; added resize method; fixed a double-ownage bug;