do not use if else without {}

fix some console error in task06