[lib] Fix the double refresh on first load.