fixed cd, removed trailing carriage on X selection