Changed refresh() method.