fixed NPE issue when there is no last opened project (e.g. during fresh install)