Fix failed Erlang test for problem 8.