Fix #41 (and test it)