Fix merge error, plus minor changes