fixing phone state null pointers