Fix missing close brace in wrap function