some corrections in debug