Fix JSON and attribute issues