misc fixes

I haven't tested if that works