Make header transition smoother