Fix NoMethodError

Fix NoMethodError in ruby 1.9.3