Fixed small date bug, when no sales are given this call failed