Fix ref log parsing so it works properly.