fix attribute type error