fix for negative peak discovery, more logging