diff --git a/modules/paper-calendar.xml b/modules/paper-calendar.xml
index 6feb773..3921a0d 100644
--- a/modules/paper-calendar.xml
+++ b/modules/paper-calendar.xml
@@ -572,11 +572,6 @@
 			</xsl:for-each>
 		</common>
 		<common formats="/html/xhtml/">
-			<!-- Not sure why, but this doesn't work if you just access @current directly in the if below. -->
-<!-- 
-			<xsl:variable name="current" select="@current" />
- -->
-			
 			<xsl:for-each select="row">
 				<tr>
 					<!-- Output the week number and dates columns. -->
@@ -673,7 +668,7 @@
 			<xsl:call-template name="generate-number-cell">
 				<xsl:with-param name="rows">1</xsl:with-param>
 				<xsl:with-param name="colour">ltgrey</xsl:with-param>
-				<xsl:with-param name="number" select="1 + count( preceding::week[not( @holiday )] )" />
+				<xsl:with-param name="number" select="1 + count( preceding::lecture[node() and not( @holiday )] )" />
 			</xsl:call-template>
 
 			<xsl:call-template name="generate-content-cell">