Fixed outofmemoryerror to some point.