fix remaining issues

Stuff found during integration with a real idjc instance.
Next I have to go test this on the actual versions we will be using.