Fixes for agent location and profile, SSL connections