Fixed $connection_upgrade variable declaration