Yi - fix bug for nullpointerexception