Fix some stuff to cooperate with recent changes