omitted changes from commit b2c9d9433e666edd08b781b3862ac03b2837b0be