Fix for no attribute bug