updates and fixes from internal use for others