fix page mapping functions