fixed bug in bunch spacing determination