SMS NullPointer bug fix