Fix salt generation code