Fix issues with parsing JSON