Found the bug. Just other people having the same issue:
It was an uninitiallized boolean. Default on debugger seems to be false but in release it switches for a true....(mingw)