fix bug with ssize_t