fixed out of memory with dictionary