fixed a bug in newlib