Fix #21 and test the correct semantics