fixed genmainjson