fix space count