fixes from mike & garrett