fixed buf in factory wrt receiving direct primitives