Fix: pattern-match on correct error form

closes #13
Fix specs

Removes all Dialyzer errors