Fixed some small bugs when finishing hash-execution.