fix bugs before jquery script