fixed null pointers again