Add corner definitions to try and fix the cornering issue in calculations.