Fix attribute errors (how could this ever have run?)