fixed bug in spaces