Fix bug: missing data. Change queries accordingly.