fix for salt generation to match the code