Fixes from bad branch merge