Fixed no attribute error.