Remove trailing space in error message