fix bookmark max-height, change timing of saving current state