Fix bug with space removal