Fixes #1888, took care of failing JSON tests