Some code adjustments