fixing crash happening when data is incomplete (e.g. sensor just added).