Revert pawitp's patch