fixed a fouc problem