fixes and additions I came up with while writing the DumboChat application