Fix some dialyzer warnings
Merge pull request #2221 from fishcakez/dialyzer_fixes

Fix some dialyzer warnings