fixed OutOfMemoryException