some null object bug fixes