fix issue with EINTR #3