Fixed: undefined method "key_path" for nil:NilClass