corrected the bug caused by empty overlap matrix, and this can be generalized to the last site