Fixes for the hz linesearch. Not quite working yett