added id judgement,fixed a few ui problems.