merge fixes from mORMot trunk repository