fix broken whitespace skipping (\w instead of \s), add debugging