Fixed error handling
0.3.2