This should probably delay when dev is invalid so we don't burn 100% CPU.