fix a huge bug. see https://groups.google.com/forum/#!topic/xv6-jos/ILa6YTBcUv4