Explicitly define `key` in a few places to ensure correct behavior