Fixed modified detection and improved performance