fixes by Mike and David