fix build and add license