Fixing a bug that would cause autorefresh to break