Fixes password retrieval for agents.