Fix for autodetection of JSON input