fixed the issue where only the first password was saved, and fixed the incorrect
 lengths.