fixing allowing empty spaces