fixed a bug with disappearing space before the root