Registered

I understand that properly socialized ratties are wonderful pets, but I have an issue that my first rats had which I wasn't sure how to address and which I'd like to inquire about here.
I'm not sure that mine were socialized fully because my little boy would sometimes not always come out of the cage to see me and seemed reluctant to come out...once he even lashed out at my eyebrow after he had climbed up onto my shoulder. Neither boy ever tried to bite me, but they could seem protective of their cage. I know it wasn't their breeding...I got both from a very reputable breeder in the area and I'd been to her home, all of her babies were sweet as could be and none were at all protective or seemed tempermental at all, so I feel it had to be something I had or hadn't done.
Now, is this maybe a male thing or a "Not enough time" thing? Or maybe a little of both? What are some good ways to socialize babies so that these sort of habits can be avoided? :/