improved comment handling