Fixed problems with using -g and -r params when using default values