Fixed problem reading the digital pins