Compiles with clang++ and g++, but fucks up and stops working