#17 Error when stats is empty. Backported from 0.3