Fixed main Linux routine