Fixed attribute error (#1591)