Fix generated bug