Bugfixes, detect trailing spaces too