Adding licences and bug fix