Added a fix for debug builds