fix bug where uri wasn't passed to code hook