fix logic error for 'pages' recipe