Few small code adjustments