He's awkward and almost unfriendly when we're alone, yet flirty in a group?

So the guy I like teases me constantly when we're in a group. He'll sit opposite me, lean forwards so much so that his hands are on my papers, he fiddles with my things and makes fun of me in the funniest and kindest way I have ever experienced. With other girls he is serious or talks about general things but nowhere near the same as with me.

BUT! When we're alone he tries to keep it up a bit but tends to be awkward and almost unfriendly in conversation. He sometimes even walks 2 meters ahead of me in a hallway!

I don't understand?
Updates
+1 y
Umm.. just as an update could a guy please answer as well? :)
He's awkward and almost unfriendly when we're alone, yet flirty in a group?
Post Opinion