change SQL INSERT for msg duplicate bug workaround (provisional)