Moved JSON return correction to other API return statements