fixed null pointer.