Fix bug in Cosmic Ray class (ref unittest)