bugfix with JSON and repackaging