fix some logic in front page