Remove dirty-bit on Rows, use shared_ptr::unique() instead.
fix NULL usage