fix bug 22 andpart of 34