Fix json handling.