Fix #4019
Merge pull request #4032 from copumpkin/xpwn-fix

Fix #4019