fixed compatibility with MRI 1.8