another fix for json_encode differences