Add license and minor fix