fixed program returning immediately when asked to display stats
fixed unmanaged encoding errors