Fix flashing of interface when reloading page