fixed null object bug