fixed bug in Debug