fixed a silly code loss bug