Fix class not assigning error