Fixes so that it compiles and works as before.