fixed javascript jam issue when input jason is invalid