fixed some error handling race conditions
0.1.1