removed two major bugs, still not the one I am looking for