fixes by Tom