Fixing Ruby >= 1.9 issues