Works in Release mode, but fails in debug...