fix device wait
fix index