fix the hazard map opacity function