Fixes bug on class chptex