Blargh this is really ugly. I wish there were a thing that we could optionally depend on for some of these.