Fix wrapper check in latext input