Fix issues #823