fix empty d issue