another bug fix, the refactoring  is almost done I think