fixing failing `if` unit test