Fix assertion function.