Fix a compile error and restore some code that got deleted by a merge.