Fix old bug introduced when testing