Fixed issue 1249.