fix schema and trigger to correlate