They say talking to yourself is the first sign of madness but it's clearly working for Novak Djokovic. The Serb maintained his bid for a record-equalling 24th Grand Slam title but had to battle back from two sets down to beat compatriot Laslo Djere. The three-time US Open champion recovered from dropping the first two sets 4-6 4-6 to break his opponent’s serve in the first game of the third, and that gave him the platform to clean up 6-1 6-1 6-3 to progress to the fourth round in five sets. It was the eighth time in his career that Djokovic, who is aiming to match Australian Margaret Court’s tally of major wins, had successfully recovered from 2-0 down. He took a break after losing the second set for some self motivation. He said: “I did a pep talk in the mirror. It worked. “I laughed at myself because I was so agitated and annoyed with the game. I had to force myself to lift my spirits.” Djokovic will next play Croatian qualifier Borna Gojo, the world number 105. Elsewhere, Caroline Wozniacki’s fairytale run continued as she came from behind to beat American Jennifer Brady. The 33-year-old Dane, who retired more than three years ago and has had two children, won 4-6 6-3 6-1 and is through to the second week in only her third event since returning to the tour. “As a competitor and an athlete you always want to win and you have to believe in yourself, but playing here on Arthur Ashe again is a dream come true,” she said. “When I retired three years ago and having had two kids, I thought I’d just be here watching. What an honour this is.” Wozniacki will play another American next in Coco Gauff. The in-form Gauff, coming off titles in Washington and Cincinnati, also had to dig deep to withstand Belgium's Elise Mertens as the 19-year-old American fought her way to a 3-6, 6-3, 6-0 victory. "A win is a win, it doesn't matter how you get it done," said Gauff. "If anything the three-setters show everybody else I'm not going down without a fight."