fix null point exception