fix Issue #351 by checking if plugin exists before accessing its password.
add braces for style conformation
Merge pull request #352 from twosigma/fix351

fix Issue #351 by checking if plugin exists before accessing its passwor...