Fixes bug in json checking.