fixing some hanging errors