Fix AssertionError