some fixes and adjustments