added missing braces for callback, spotted by @themightychris