fixed position.to_json issue