Fix license.
Some bugs fixed upstream.