fix for debug mode