fixed stupid bug which prevented first and last GPIO from working correctly