Fixed crash issue on licence checking