Fixed bug for weekly and daily data