fix initial load bug