fix device conditionals