Ugly, awful hack. I can't think of a better way around this.