some fixes to the hessian loop generation (added new test cases)