fix route when extract pages from database