fixing key format for ruby 1.8