Fixed issues with references to 'pins' instead of 'pin'

The commit explains more.