fixed can't set attribute error