query set to empty array instead of null to avoid error