fixed out of memory #4