fixed handling of opened pages