correct bad spaces