Fixed problem when using ruby 2.0