fixed an error that caused server to crash on pages with no text