Fix wrong assertion

Closes #174