fix license calculation