Fixed some static variables that should have been accessed through the detector pointer.