corrections according to debugging