fix gen code compile error