fixes infinite loop bug on --dev