Merging fixes from lokeoke