Fix trailing whitespaces

Fixes #1138