some debug lib fixes