Compiling but buggy