Djokovic stays top of ATP rankings with Medvedev lurking