fixed check in tmdb

it could result in index out of range, fixed that
Merge pull request #16 from kubakul/patch-2

fixed check in tmdb