fixed null-object bug