We should make this a separate bug and add tests.