Fix issue where main section was not always created