Fix count bug