Updated with Statsonice v1.7 code