Merging fixes from master