fixes to handle null messages -- why did this break?