Corrected bad space checking.