fixed one bug, still one seems to be remainging