Found a few bugs thanks to DeterLab and its old GCC