Fixes handling of missing permalink variables