Fixes #1 by handling all errors