fix the minor bugs