Also, why is this assertion here?
Should this not maybe be in a unit test rather?