Fixed code gen bug on no param functions