fix outOfmemoryexception