fix silly code errors