Updated with statsonice 1.6 code