fixed jslint
fixed issue 505: statistics not populated on MacOS