fix allocate issues
fix issue 188, 207