Fixed a bug so initialization code is always inserted in main