fix bug where update_count not updated correctly