remove trailing caracters
Add if test for Ubuntun 14.04