Reapplied changes by patric42