fix history rewrite on smaller screen