Added extra glibc error protection