code cleanup. fixed problem when project toolwindow not opened after project load