Fixed deviation function and long page rendering time