Fix nil exception when calculating area.