Some fix in main