preview button bug fix