he pulled his hat off and ran a hand through his hair before seating it back on his head , then braced himself on the counter , rocking back and forth a bit , like he was teetering on the edge of some precipice .