Fix preview bug