Fixes #3256 : Remove trailling characters

http://www.rudder-project.org/redmine/issues/3256

to be merged in master