Qian's Bug Fix

bug fix first round.