bug fixes for classes