add xsel check in the beginning.