fixed geometry calc bug