Fixed null pointers