Fixes for H/D/LP generation.  One ugly hack for now, will fix later.

Change-Id: I5a1dcfb6a5e5aecd67f28c404005a2a28eb78581