minnor bug fixes