Fixes JSON data passing and parsing