Fix some SSH2 function issues