Merging fixes live

Thanks to @samdutton and moi.