making some changes to system message handling