Fixed potential null pointer exception in SSH adaptor