added __getattribute__ guard