Fixing bug where level includes spaces