Updated PasswordBox implementation