fixed check in tmdb

it could result in index out of range, fixed that