fix some CSS related JS bug