fix dialyzer warning (function has no local return)