fixed: numRead was missing a volatile declaration