Added a check for pin numbers not divisible by 8.