Fixes pwgen function