fix no attribute errors