fixing options passing in to_json