main: Some of fixes