fixed bug related to D