Fix mistake + add unit test