fix bugs from class