bug fix generate object