first some fixes