fix bug and add license