Merge patches from Christopher83