Fixed bug in detector definition