fix index off by one bug

When click to pen encrypted library, input the correct password, the 1.3.0 version navigates to the wrong library, actually it always navigates to the off-by-one index library.