Fix malformed snippet and restore quotes