Now compiles and works as expected.