Fixing assertion errors.