added check in thumb() utils