make it work for the recent erlang