1M is way higher than the recommended maximum input impedance of 10k...
Just don't bother reading an unconnected pin!