hdt: Fixing automatic mode parsing