bugfix in custom detector response function