Fixed crash when trying to encrypt password