Issue 3223 fixed

https://code.google.com/p/sympy/issues/detail?id=3223