Key distribution + password management fix

Fix for a bug from the last update