C library error setting fix