conversion todev was corrupted by missing else