fixing 3d-attribute writing