fix some bug(alloc) for the data model