Fix internal inconsistency problem.

- Well, Xcode did it at least.

Signed-off-by: Aron Cedercrantz <aron@cedercrantz.se>
Fix a possible crash when not in DEBUG mode.

Signed-off-by: Aron Cedercrantz <aron@cedercrantz.se>