fix bindattrs_*, implement getattrs_*, simplify getattr_*