save page number when gui closes