Fix assertion failure