Fixed count bug