merge bug fixes from various other authors