Misc fixes

I forgot I had made these fixes, but now that I sent fabrice over here, I remembered...