fix bugs when generate properties