fix hdp code