Fixed build issues for main