Fix casting when returning from panic
Merge pull request #26 from franela/error_cast

Fix casting when returning from panic