Fixing bug 1181

--HG--
extra : source : 3dec59cce7f6f1bf5d683c28649f3dfd2dcb2e4d