Fixed the queries for activities and persons flot.