bit count program: 1 small bug