fix bug in trapfunc sinkhole
Merge pull request #6247 from BevapDin/fix-bug-in-trap

Fix bug in trapfunc sinkhole