revert getattr hack and move elsewhere