Applied patch to fix attribute errors