Fixed a seg fault discovered on regressions.