Changes inspired by the nischu7 branch