Fix bug with encrypt passwords