improve page callback for open handler.