Properly set the mode during OpenPin()