fixed compilation issues and added working statistics job