fix some obvious bugs.  new test for hook server