put entry_count in the right place