Made the patch function py3 compatible