diff --git a/src/main/java/writer2latex/xhtml/TextConverter.java b/src/main/java/writer2latex/xhtml/TextConverter.java
index 6365978..fd239f5 100644
--- a/src/main/java/writer2latex/xhtml/TextConverter.java
+++ b/src/main/java/writer2latex/xhtml/TextConverter.java
@@ -353,7 +353,7 @@ public class TextConverter extends ConverterHelper {
}
}
if (head != null && style == null){
- StyleWithProperties headStyle = ofr.getParStyle(Misc.getAttribute(para,XMLString.TEXT_STYLE_NAME));
+ StyleWithProperties headStyle = ofr.getParStyle(Misc.getAttribute(head,XMLString.TEXT_STYLE_NAME));
if (headStyle != null) {
newPageNumberProperty = headStyle.getParProperty(XMLString.STYLE_PAGE_NUMBER, true);
}