Fixed error in  autogeneration script