Merging minor bug fixes