Fixes to whitespace processing