Carried over some fixes from GTC stack.