We do things based on our plan. In short it is called 'intention/ niat'. Some one go to UK/USA to study but there is a dot of element to buy expensive car, touring Europe, Russia etc etc. If there is a dot of other intentions not in line with Allah's sake .. then that is not called ibadat.
If our plan/ niat is good ..then just say Alhamdulillah and pray that you will have the istiqamah to stay that way until the end Else....
If our niat is not good then .. rectify the niat and say lots and lots of istighfar .. and change your intention for the sake of Allah.
Example: One day you plan to go to Kuala Lumpur ..but suddenly you realize you are going to Temerloh. You usually say "Astahg firullah / OMG .. and make all effort to U turn few KM in front of you ..right ..."
Similar is to our actions and intentions .. in the eyes of Allah.
It is not too late to change the niat of any of our actions. As long we have the life, we can do that .. please.
Just change it. Insyallah .. Allah will accept it and make your PhD ..going smoothly and successful ever after.
Till then Good Bye.