Merged changes from master (which was from osx).