Fix bug from auto generation