fixed an attribute error