Added checks for refresh command.