Fixes assertion errors.