Fix crash when missing 'main'