Commits a part of the fix.patch provided by Dmitri Melnikov in the dev maling list thread "password storage exception" in order to try to address NullPointerExceptions.