Compile fix for debug mode (Gil, is this behaviour correct?)