Fixed restore histogram error.