TRQ-2973 This fixes a couple of things but probably not the whole thing.