now handles system messages better