various patches

Here are a few minor fixes