fixed fatal error bit mask.
Merge pull request #172 from artyfarty/master

Fix for error handling