Some minor changes to enable statistics