a few misc fixes