fixed -d command line option