Fix pin initialization when a mode argument is provided
Merge pull request #542 from dhylands/fix-pin

Fix pin initialization when a mode argument is provided