Wrong return URLs in PayPal Standard
I used the alterPaymentProcessorParams Hook to override the parameters 'return' and 'cancel_return'. 

The code looks like this:

function civicrm_alterPaymentProcessorParams($paymentObj,  &amp;$rawParams,  &amp;$cookedParams) 
{  
    if ($paymentObj-&gt;_processorName == "PayPal Standard") 
    {    
        if (!empty($rawParams['successUrl'])) {
            $cookedParams['return'] = $rawParams['successUrl'];
        }
        if (!empty($rawParams['cancelUrl'])) {
            $cookedParams['cancel_return'] = $rawParams['cancelUrl']; 
        }
    }  
}


$rawParams is the parameters that you passed to the payment processor in CiviCRM and cookedParams is what is passed from CiviCRM on to the Payment Site.