Ignore empty nodes when counting position

close #46