Fixing issue with exponents on Ruby 1.8