ActiveRecord recovery fixes