port over fixes from standard-web