Added automatic refresh support.