code fix for debug version