bug fix, still one bug remains