Add GPL header and a minor modification