fix bug when try to load using malloc