fix for salt generation