In statsdialog.cpp fix initialization iEnd
In preferences.h now argument is const references