Fixed error on ruby 1.8