Updated the backward particle filter to use log-weights