Typo fix.
Bug fix in findTermsByPosts.
$attachment might not be defined.