More tweaks to message handling