fixed some latex mode hooks