Fixed problem with latex in hidden gaps