Fixed a runtime error in Ruby 1.8.7
Merge branch 'master' into sl_model