A few tiny bug fixes