Finally found the fucking bug