revert a previously made pull request merge, that leads to a crash

Sorry for the confusion, here is the fix that reverts the merge that leads to a crash.