swap :id to :key to fix ruby 1.8 issues