Fix bug where spacers could be removed after the check for the right number of spacers
Fix bug where there were not enough spacers to determine the standard deviation of lengths causing arithmetic errors