fixed bug on new -d feature