Fix issue with incorrect pin number being set.
Fix incorrect indentation.