fix out of memory