fixed issue with creatingssh>create>cancel>create
organized code a bit