Fixed refresh-page bug