removed duplicates and malformed expressions from triggers