Fix issue 1179