Remove trailing whitespace from error messages

Fix for bug #867