change setTimeout

to prevent bug when loading the data