Added lock for classifier