Restore correct user when agent run as owner