Dovizioso shoots into top three in closing moments