fixed various mistakes