Fixed a bug which occurred when -datadir was not specified.