Fix for GHKM derivation.
Merge branch 'master' into output-alignment