Fix field detection
Fixes #11 and Closes #19
Merge pull request #21 from novapost/fix/raise-error

Fix/raise error