fix bugs in read/write of selection node
fix bug