Fix problem saving credentials