Fixed bug for getting classes