Fixed a race condition when setting a single port bit in main
and the ISR.