fix crash on esl-erlang > 17.0, thx @0x20c24