Fix codexpagespans issue