support insert/update states bug