fix bug and use json for version