fix bug: null point exception