Fix bug while inserting into SmartStore