Fix bugs with HMDA loading

Solves #180