fixed null pointer when calling setPassword