Fix missing where clause from sensor metadata.