Fixes to the 'refresh' subcommand