previous commit did not fix bug. looks like it was caused by using xclip. replaced command with xsel and it appears to be working