fix various mistakes