Further bug fixes on init generation