Updated to properly store targetHost