Fix match error found by dialyzer