Repaired the custom message handler.