Fixing thumbnail bug