fix dodgy logic causing fault when hinted class not found