Fix failing unit test for #304