Spec fixes to pass dialyzer check