Fix stupid bug in mode handling