Bug fixes and merge.