fix error and add apache license