fix update_or_create in create_stats