Fix test classes handling.