Fix functions deprecated in Elixir 0.12