tracked down and fixed two deadly interweb bugs