fixed a bug with salt encryption