fixed fouc caused by animation