Bug fix: a crash would occurred when loading primitives from a BIN file