correctly handle all-zero hessians