fix typo and minor bug

When status is null, it db would treat it as pending