Improve compatibility for log parsing