Fix license logic