add emergency stop to match.c