refactor first query.
Usage of $first is dangerous.