Small bugfix for pulling historical data