Fixed the hasattr.