Fixed error with getattr