General fixes and adjustments