Fix a bug of 'getfence()'

Fixed a bug where the matching parenthesis does not work at the time of the
beginning of the buffer