Remove fouc style before going to current index