Fix handling error blocks correctly
Merge pull request #1 from mocchira/master

Fix handling error blocks correctly