bug fix on spaces