dialyzer: fix errors, add specs