fixed null pointers