erlang compatibility fix