This fixes #8105 and #8103

remove trailing spaces. same below.