Fix various undefined things.