Fix several bugs. Last used password is updated when it was manually modified.