Roger Federer’s bid to win his 100th career singles at the ATP Finals title hit the buffers in his opening match against Kei Nishikori.The 37-year-old Swiss star, attempting to win a record seventh title and a first since 2011, was beaten in straight sets by the Japanese world number nine.Federer had won his previous 15 opening matches at the season-ending event, but put in an error-strewn display in his first round-robin match at London’s 02 Arena.Nishikori had lost his previous six matches against Federer, but, after winning a first-set tie-break, kept his nerve to rack up a surprise, but thoroughly-deserved, 7-6 (4), 6-4 victory.“I’m glad to win, it’s never easy to play with my idol,” said Nishikori.“It’s always a big challenge to play Roger. The first match is not easy, both of us were playing a bit out, but the second set was better.“I lost to him twice in the last two months so I played more aggressively and things started working, especially in the second set. There were some lucky points but I played well today.”Federer made an uncharacteristic 36 unforced errors, 20 in the first set, but that was to take nothing away from Nishikori.Federer admitted his practice has been “a bit all over the place”, but had no excuses.“I felt we both struggled throughout the first set. You could tell it was sort of a first round,” he said.“I had my chances maybe a bit more than he did. Then I started to feel better in the second set. I think we both did. The level went up but unfortunately I couldn’t keep the lead that I got early.”Despite Federer falling to a shock defeat, not all the focus was on him after the game.Unfortunately for Andrew Castle, a remark he made during commentary didn't go down well with tennis fans.Federer was hit with a code violating during his defeat to Nishikori, something that doesn't usually happen to him, but after receiving said violation, Castle said in commentary: "I don't think we will see a Serena Williams meltdown and call him a liar and a thief."This little jibe at Williams did not go down well with tennis fans online.