* fixed wrong number of bytes read returned