Fix -d option problem in getcommand.