Fixed sporadically failing specs.
Fix up hook issues