Fixed same bug in same class. Needs more tests