fix 168 and some null issues