Revert "patch from loopj branch"

This reverts commit 43ee7a00471c20cf01e132e442a8a3d758883e2a.