Fixed a potential AttributeError issue. :)