some fixes by fabbot