Cleaned up stats and prevent double writing