fix a bug (unable to specify 0 as a PK value)