Fixed OutOfMemory exception