Bug fixes in Debug framework