Fixed trailing whitespace and fixed ssh bug by introduced by slight refactoring