fix out of memory bug and init imageloader