modify build_point_state.m file for some errors