fixed remaining bugs related to classes