correct rcast for attributes