fixes fro ruby 1.8.7
fixed 1.8.7 issues and content-hosts from SAM