sys_gen bug fixed