Fixed allocate bug
Fixed compare bug