Merge bugfixes into master.