Fixed invalid errno being returned in errors
0.2.2